{
Function:       _StdDev   (Standard Deviation)

Purpose:        Calculate the standard deviation, using a wrapper function to obtain results from
                _StdDevMean, which provides both Standard Deviation and Mean value results.
                
                Timing tests reveal that addition of the wrapper does not add significantly to
                processing times:
                
                _StdDevMean called directly:                  28-30 uSec
                _StdDevSA (wrapper for _StdDevMeanSA):        32-33 uSec (slightly faster ??)

                Timing tests showed calling _StdDevMean thru the wrapper routine, _StdDev, is only 3-4 uSec 
                slower than calling _StdDevMean directly.

Timing:         TS StdDev function call:            65-68 uSec
                _StdDev wrapper for _StdDevMean:    31-34 uSec
                _StdDevMean function                27    uSec
                _StdDevMeanSA function              17-18 uSec
                in line _StdDevMean                 19-21 uSec 
                in line _StdDevMeanSA               17-19 uSec

Author:         MarkSanDiego


Updated:        09/01/08    original version
                05/03/09    reverted this method to match _StdDevMeanFC
                07/11/11    x, oMean and oStdDev must be be declared double (Not single) otherwise 
                            Numeric inaccuracies result.
}                    


inputs:
    Price(NumericSeries),
    Length(NumericSimple);        { length used to measure average and standard deviation, may vary }
        
variables: 
    double x(0),
    double oMean(0), 
    double oStdDev(0);                    

    x = _StdDevMean(Price, Length, 1, oMean, oStdDev);    
    
    _StdDev = oStdDev;    

